<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改人员信息')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-propertyInfo-edit" th:object="${propertyInfo}">
            <input name="infoId" class="form-control" type="hidden" th:field = "*{infoId}">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">序号：</label>
                <div class="col-sm-8">
                    <input name="num" class="form-control" type="text" th:field = "*{num}" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">姓名：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" th:field = "*{name}" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">部门：</label>
                <div class="col-sm-8">
                    <input name="dep" class="form-control" type="text" th:field = "*{dep}" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">职务：</label>
                <div class="col-sm-8">
                    <input name="position" class="form-control" type="text" th:field = "*{position}" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">身份证号：</label>
                <div class="col-sm-8">
                    <input name="idNumber" class="form-control" type="text" th:field = "*{idNumber}" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">手机号：</label>
                <div class="col-sm-8">
                    <input name="phoneNo" class="form-control" type="text" th:field = "*{phoneNo}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">学校：</label>
                <div class="col-sm-8">
                    <input name="school" class="form-control" type="text" th:field = "*{school}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">专业：</label>
                <div class="col-sm-8">
                    <input name="major" class="form-control" type="text" th:field = "*{major}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">学历：</label>
                <div class="col-sm-8">
                    <input name="degree" class="form-control" type="text" th:field = "*{degree}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">学位：</label>
                <div class="col-sm-8">
                    <input name="diploma" class="form-control" type="text" th:field = "*{diploma}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">社保卡卡号：</label>
                <div class="col-sm-8">
                    <input name="socialSecurityId" class="form-control" type="text" th:field = "*{socialSecurityId}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">公积金账号：</label>
                <div class="col-sm-8">
                    <input name="accFundId" class="form-control" type="text" th:field = "*{accFundId}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">婚姻状态：</label>
                <div class="col-sm-8">
                    <select name="maritalStatus" class="form-control" th:field="*{maritalStatus}">
                        <option value="1">已婚</option>
                        <option value="2">未婚</option>
                        <option value="3">未知</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参加工作时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input autocomplete="off" type="text" class="time-input form-control" id="jobTime" placeholder="请填写日期" name="jobTime" th:value="*{#dates.format(jobTime, 'yyyy-MM-dd')}"/>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入司时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input autocomplete="off" type="text" class="time-input form-control" id="companyTime" th:value="*{#dates.format(companyTime, 'yyyy-MM-dd')}" placeholder="请填写日期" name="companyTime"/>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">职业资格证书：</label>
                <div class="col-sm-8">
                    <input name="qualifyCertificate" class="form-control" type="text" th:field = "*{qualifyCertificate}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">职称：</label>
                <div class="col-sm-8">
                    <input name="profession" class="form-control" type="text" th:field = "*{profession}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">政治面貌：</label>
                <div class="col-sm-8">
                    <input name="politicsStatus" class="form-control" type="text" th:field = "*{politicsStatus}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入党时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input autocomplete="off" type="text" class="time-input form-control" id="partyTime" th:value="*{#dates.format(partyTime, 'yyyy-MM-dd')}" placeholder="请填写日期" name="partyTime"/>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control" th:field="*{status}">
                        <option value="1">正常</option>
                        <option value="2">退休</option>
                        <option value="3">离职</option>
                        <option value="4">解聘</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="comment" class="form-control" type="text" th:value="*{comment}">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "hrm/propertyInfo";
        /*将后台的值传入前台*/
        var propertyInfo = [[${propertyInfo}]];

        /*$(document).ready(function(){initChoice();})的简写
        * function () {}里面的内容是在页面都加载完才执行*/
        $(function () {

        })

        $("#form-propertyInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-propertyInfo-edit').serialize());
            }
        }

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "date",
            autoclose: true
        });

    </script>
</body>
</html>